﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Pomodoro.Web._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link rel="Stylesheet" href="CSS/Pomodoro.css" />
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:Label ID="Alertas" runat="server" />
        </div>
        <div>
            <asp:TextBox ID="CampoNovaTarefa" runat="server" />
            <asp:Button ID="BtnNovaTarefa"  
                        Text="Nova tarefa"
                        OnClick="BtnNovaTarefa_Click" 
                        runat="server"/>
        </div>
        <div>
            <asp:GridView   ID="ListaTarefas" 
                            AutoGenerateColumns="False" 
                            OnRowCommand="ListaTarefas_RowCommand" 
                            OnRowDataBound="ListaTarefas_RowDataBound"
                            DataKeyNames="Started"
                            runat="server">
                <Columns>
                    <asp:BoundField DataField="ID" HeaderText="#" />
                    <asp:BoundField DataField="Description" HeaderText="Descrição" />
                    <asp:TemplateField HeaderText="Iniciar">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkIniciar" 
                                            Text="Iniciar"
                                            CommandName="IniciarTarefa"  
                                            CommandArgument='<%# Eval("ID") %>' 
                                            runat="server"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Status"  HeaderText="Status" />
                    <asp:BoundField DataField="Started" HeaderText="Iniciado?" Visible="false"/>
                </Columns>
            </asp:GridView>
        </div>
    </form>
</body>
</html>
